package com.summer_administration.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;
import lombok.Data;
import java.time.LocalDateTime;

@Data
public class CommuneArrange {
    private Integer id;

    @NotBlank(message = "社区不能为空")
    private String commune;

    @JsonFormat(pattern = "yyyy.MM.dd HH:mm:ss")
    @NotNull(message = "时间不能为空")
    private LocalDateTime time;

    @NotBlank(message = "地址不能为空")
    private String address;

    //@NotBlank(message = "小组ID不能为空")
    private String groupId;

    @NotBlank(message = "小组名称不能为空")
    private String groupName;

    @NotNull(message = "志愿者数量不能为空")
    @Min(value = 1, message = "志愿者数量至少1人")
    private Integer volNumber;

    @NotNull(message = "儿童数量不能为空")
    @Min(value = 0, message = "儿童数量不能为负数")
    private Integer childrenNum;

    @NotBlank(message = "年龄段不能为空")
    private String ageGroup;

    @NotBlank(message = "设备不能为空")
    @Pattern(regexp = "电子屏|投影", message = "设备类型不合法")
    private String facility;

    @NotBlank(message = "奖品不能为空")
    private String prize;

    private Integer createUser;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}